/*
 * @Author: fisher
 * @Date: 2024-01-16 14:27:12
 * @LastEditTime: 2024-02-18 14:39:28
 * @LastEditors: fisher luthor-li@qq.com
 * @Description:
 * @FilePath: \allfront\src\utils\cesium\load.js
 */
import { GenerateId } from '../index';
export const load3dtilesByUrl = async (data, headers) => {
  const { url, title } = data;
  const resource = new Cesium.Resource({
    url,
    headers,
  });
  const t = await Cesium.Cesium3DTileset.fromUrl(resource);
  t.FID = GenerateId(18);
  t.FNAME = title;
  viewer.scene.primitives.add(t);
  return t;
};
